package com.torry.replay.api.request;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalTime;
import java.util.List;

/**
 * @author torry.wang
 */
@Data
@ApiModel("涨停板数据")
public class SaveLimitUpInfoRequest {

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    @ApiModelProperty(value = "日期 yyyy-MM-dd")
    private LocalDate date;
    private List<LimitUpInfo> list;

    @Data
    public static class LimitUpInfo {
        private Long id;

        private String name;

        private BigDecimal price;

        @ApiModelProperty(value = "放量1 缩量2 平量3")
        private Integer quantity;

        @ApiModelProperty(value = "涨幅 单位 %")
        private Double increaseRange;

        @ApiModelProperty(value = "流通市值，单位 亿")
        private Double marketValue;

        @ApiModelProperty(value = "成交额 单位 万")
        private Double volume;

        @ApiModelProperty(value = "换手率 单位 %")
        private Double turnoverRate;

        @ApiModelProperty(value = "封板时间")
        @DateTimeFormat(pattern = "HH:mm:ss")
        @JSONField(format = "HH:mm:ss")
        private LocalTime limitTime;

        @ApiModelProperty(value = "最后封板时间")
        @DateTimeFormat(pattern = "HH:mm:ss")
        @JSONField(format = "HH:mm:ss")
        private LocalTime lastLimitTime;

        @ApiModelProperty(value = "炸板次数")
        private Integer bombCount;

        @ApiModelProperty(value = "涨停统计 几天几板")
        private String stat;

        @ApiModelProperty(value = "连板数")
        private Integer continuousCount;

        @ApiModelProperty(value = "涨停逻辑")
        private List<String> logics;

        @ApiModelProperty(value = "板块/概念 标签id")
        private Integer tagId;
    }

}
